package BehavioralPatterns.Observer;

public class Test {
  public static void main(String[] args) {
    WeatherData weatherData = new WeatherData();
    CurrentConditions currentConditions = new CurrentConditions();
    weatherData.registerObserver(currentConditions);

    Baidu baidu = new Baidu();
    weatherData.registerObserver(baidu);

    weatherData.remove(baidu);

    System.out.println("通知观察者：");
    weatherData.setData(30f,30f,30f);
  }
}
